package com.xbongbong.pro.enums.errorcodes;

import com.xbongbong.i18n.util.I18nMessageUtil;
import lombok.Getter;

/**
 * 营销错误枚举
 * @author haibin
 */
@Getter
public enum MarketingErrorCodeEnum implements ErrorCode {
    API_ERROR_1500030(1500030, "enum.errorCode.msg.api_error_1500030"),
    API_ERROR_1500031(1500031, "enum.errorCode.msg.api_error_1500031"),
    API_ERROR_1500032(1500032, "enum.errorCode.msg.api_error_1500032"),
    API_ERROR_1500033(1500033, "enum.errorCode.msg.api_error_1500033"),
    API_ERROR_1500034(1500034, "enum.errorCode.msg.api_error_1500034"),
    API_ERROR_1500006(1500006, "enum.errorCode.msg.api_error_1500006"),
    API_ERROR_1500007(1500007, "enum.errorCode.msg.api_error_1500007"),
    API_ERROR_1500008(1500008, "enum.errorCode.msg.api_error_1500008"),
    API_ERROR_1500009(1500009, "enum.errorCode.msg.api_error_1500009"),
    API_ERROR_1500010(1500010, "enum.errorCode.msg.api_error_1500010"),
    API_ERROR_1500011(1500011, "enum.errorCode.msg.api_error_1500011"),
    API_ERROR_1500012(1500012, "enum.errorCode.msg.api_error_1500012"),
    API_ERROR_1500013(1500013, "enum.errorCode.msg.api_error_1500013"),
    API_ERROR_1500014(1500014, "enum.errorCode.msg.api_error_1500014"),
    API_ERROR_1500015(1500015, "enum.errorCode.msg.api_error_1500015"),
    API_ERROR_1500016(1500016, "enum.errorCode.msg.api_error_1500016"),
    API_ERROR_1500017(1500017, "enum.errorCode.msg.api_error_1500017"),
    API_ERROR_1500018(1500018, "enum.errorCode.msg.api_error_1500018"),
    ;

    /**
     * 错误码
     */
    private final int code;
    /**
     * 错误描述
     */
    private final String msg;

    MarketingErrorCodeEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;

    }

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return I18nMessageUtil.getMessage(msg);
    }
}
